﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site3.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	NuevaMateria
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <link href="../../Content/jquery-ui-1.8.13.custom.css" rel="stylesheet" type="text/css" />   
    <script src="../../Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-ui-1.8.13.custom.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-ui-timepicker-addon.js" type="text/javascript"></script>

    <script>
        $(function () {
        
        $("#curso").change(function () {
             var c = $("#curso").val();
                $.getJSON("<%=Url.Action("getasignaturas") %>"+"/"+"?ID="+c, null,function(Data){
                        $("#asignatura").html(Data);                        

	                });
            });

        
        
        });

    </script>    


    <h2>Nueva Materia</h2>

    
    <form action="/Admin/NuevaMateria" method="post">
    <br />
    Curso
    <br />
     <table>
    <tr><td><select style="width: 100%" id="curso" size="5" name="curso"><%=TempData["listacursos"] as string %></select></td>
    <td><select width="200" style="width: 200px" id="asignatura" size="5" name="asignatura"></select></td></tr>
    </table>
    <br />
    <br />
    Nombre Materia
    <br />
    <input id="nombre" type="text" name = "nombre" />
    <br />
    <br />
    Descripción
    <br />
    <textarea name = 'descripcion' cols = 30 rows = 5></textarea>
    <br />
    <br />
    <input type="submit" value="Agregar" />
    </form>


</asp:Content>
